#ifndef __UPDATEBLL_H__
#define __UPDATEBLL_H__

#include "BasicInclude.h"

#define ENABLE_GLOBAL_INT()	__set_PRIMASK(0)
#define DISABLE_GLOBAL_INT()	__set_PRIMASK(1)

void InitUpdateInfo(void);
void SetUpdatePackageInfo(uint32_t u32PackageSize);
uint32_t GetUpdatePackageSize(void);
uint8_t* GetUpdatePackageBuff(void);
void ResetSystem(void);
void SavePackageToFlash(uint8_t *data, uint8_t length);

bool MoveUpdateToApplication(void);

void JumpToApplication(volatile uint32_t AppAddr);
#endif
